﻿var grid;
var columns = [
					{ id: "IncomeExpense", name: "IncomeExpense", field: "IncomeExpense" },
					{ id: "TransactionDate", name: "TransactionDate", field: "TransactionDate" },
                    { id: "TransactionAmount", name: "TransactionAmount", field: "TransactionAmount" },
					{ id: "TransactionMode", name: "TransactionMode", field: "TransactionMode" },
                    { id: "TransactionHeadDetails", name: "TransactionHeadDetails", field: "TransactionHeadDetails" },
					{ id: "ChequeDetails", name: "ChequeDetails", field: "ChequeDetails" },
                    { id: "CurrentBalance", name: "CurrentBalance", field: "CurrentBalance" },
					{ id: "Narration", name: "Narration", field: "Narration" },
];

var options = {
    enableCellNavigation: true,
    enableColumnReorder: false
};

$(function () {
    var incomeExpenseData = [];
    $.getJSON('/Home/IncomeExpenseSummary', function (data) {
        incomeExpenseData = data;
        grid = new Slick.Grid("#incomeExpenseDiv", incomeExpenseData, columns, options);
    });
});